package com.xzkcompany.test_xzkdemo

import android.os.Bundle
import androidx.annotation.NonNull;
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant
//import com.baidu.mapapi.map.MapView
import io.flutter.Log
import io.flutter.embedding.android.FlutterActivity
//import io.flutter.app.FlutterActivity



class MainActivity: FlutterActivity() {
//    val TAG:String = 'MainActivity'

//    override fun onCreate(savedInstanceState: Bundle?) {
//        super.onCreate(savedInstanceState)
//
//        val mapView:MapView = MapView(this)
//        MapRegistrant.registerWith(this, mapView)
//
//    }
    override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
        GeneratedPluginRegistrant.registerWith(flutterEngine);

    }
//    private fun registerPlugins(@NonNull flutterEngine: FlutterEngine) {
//        try {
//            val generatedPluginRegistrant = Class.forName("io.flutter.plugins.GeneratedPluginRegistrant")
//            val registrationMethod = generatedPluginRegistrant.getDeclaredMethod("registerWith", FlutterEngine::class.java)
//            registrationMethod.invoke(null, flutterEngine)
//        } catch (e: Exception) {
//            Log.w(TAG, "Tried to automatically register plugins with FlutterEngine ("
//                    + flutterEngine + ") but could not find and invoke the GeneratedPluginRegistrant.")
//        }
//
//    }
}
